#include <stdio.h>
#include <unistd.h>
#include "my_popen.h"


int main(){
    char buff[1024] = {0};
    FILE* fp = NULL;
    // fp = my_popen("cat popen.c", "r");
    // while(fread(buff, 1, 1024, fp) > 0){
    //     printf("%s", buff);
    // }
    // my_pclose(fp);
    snprintf(buff, 1024, "helloworld\n");
    fp = my_popen("cat", "w");
    fwrite(buff, 1, 1024, fp);
    my_pclose(fp);
    return 0;
}
